put the value of (card field class1 + card field class2)/4 into sum
put the value of sum into card field F6
put the value of (sum *3) into card field F5
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=313 top=163 right=182 bottom=357
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 1:2:1
----- HyperTalk script -----
on mouseUp
global sum
put the value of (card field class1 + card field class2 + card field class3)/4 into sum
put the value of sum into card field F5
put the value of sum into card field F7
put the value of (sum * 2) into card field F6
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=362 top=163 right=182 bottom=406
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 9:3:4
----- HyperTalk script -----
on mouseUp
global sum
put the value of (card field class1 + card field class2 + card field class3)/16 into sum
put the value of (sum * 9) into card field F5
put the value of (sum * 4) into card field F7
put the value of (sum * 3) into card field F6
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=411 top=164 right=183 bottom=455
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 9:7
----- HyperTalk script -----
on mouseUp
global sum
put the value of (card field class1 + card field class2)/16 into sum
put the value of (sum * 7) into card field F6
put the value of (sum * 9) into card field F5
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=458 top=164 right=183 bottom=502
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 15:1
----- HyperTalk script -----
on mouseUp
global sum
put the value of (card field class1 + card field class2)/16 into sum
put the value of sum into card field F6
put the value of (sum * 15) into card field F5
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=259 top=187 right=206 bottom=303
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 13:3
----- HyperTalk script -----
on mouseUp
global sum
put the value of (card field class1 + card field class2)/16 into sum
put the value of (sum * 3) into card field F6
put the value of (sum * 13) into card field F5
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=305 top=188 right=207 bottom=349
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 12:4
----- HyperTalk script -----
on mouseUp
global sum
put the value of (card field class1 + card field class2)/16 into sum
put the value of (sum * 4) into card field F6
put the value of (sum * 12) into card field F5
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=351 top=189 right=208 bottom=395
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 12:3:1
----- HyperTalk script -----
on mouseUp
global sum
put the value of (card field class1 + card field class2 + card field class3)/16 into sum
put the value of (sum * 12) into card field F5
put the value of sum into card field F7
put the value of (sum * 3) into card field F6
end mouseUp
-- part 13 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=398 top=189 right=208 bottom=464
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 9:3:3:1
----- HyperTalk script -----
on mouseUp
global sum
put the value of ((card field class1 + card field class2 + card field class3 + card field class4)/16) into sum
put the value of (sum * 9) into card field F5
put the value of (sum * 3) into card field F6
put the value of (sum * 3) into card field F7
put the value of sum into card field F8
end mouseUp
-- part 14 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=302 top=232 right=254 bottom=362
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: F5
-- part 15 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=302 top=259 right=281 bottom=362
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: F6
-- part 16 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=302 top=286 right=308 bottom=362
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: F7
-- part 17 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=300 top=313 right=335 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: F8
-- part 18 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=167 top=315 right=337 bottom=267
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DATA ENTRY
----- HyperTalk script -----
on mouseUp
delete line 1 of card field class1
put 0 into card field class2
put 0 into card field class3
put 0 into card field class4
put 0 into card field f5
put 0 into card field f6
put 0 into card field f7
put 0 into card field f8
get the location of card field class1
click at it
end mouseUp
-- part 19 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=433 top=269 right=292 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: CHI SQUARE
----- HyperTalk script -----
on mouseUp
global bagI
global bagII
global bagIII
global bagIV
global bagV
global bagVI
global bagVII
global bagVIII
put the value of card field class1 into bagI
put the value of card field class2 into bagII
put the value of card field class3 into bagIII
put the value of card field class4 into bagIV
put the value of card field F5 into bagV
put the value of card field F6 into bagVI
put the value of card field F7 into bagVII
put the value of card field F8 into bagVIII
go next
global sumchi
delete line 1 of card field F4
delete line 1 of card field F5
put 0 into sumchi
add (((bagI - bagV)^2)/bagV) to sumchi
add (((bagII - bagVI)^2)/bagVI) to sumchi
put sumchi into card field F1
if the value of bagIII <> 0 then
add the value of (((bagIII- bagVII)^2)/bagVII) to sumchi
put sumchi into card field F1
else
end if
if the value of bagIV <> 0 then
add the value of (((bagIV - bagVIII)^2)/bagVIII) to sumchi
put sumchi into card field F1
end if
end mouseUp
-- part 20 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=466 top=189 right=208 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 2:1
----- HyperTalk script -----
on mouseUp
set numberFormat to "000.000"
global sum
put the value of (card field class1 + card field class2)/3 into sum
put the value of sum into card field F6
put the value of (sum * 2) into card field F5
wait 3 seconds
go to card id 52047
end mouseUp
-- part contents for background part 1
----- text -----
CHI SQUARE
-- part contents for background part 2
----- text -----
WARNING!!! THE CHI SQUARE PROGRAMS AUTOMATICALLY RUN WHEN ACCESSED. THEREFORE, YOU MUST HAVE DATA ON THIS CARD IN ORDER TO AVOID A DIALOGUE BOX STATING THAT THE VALUE OF THE EXPRESSION CANNOT BE TAKEN. THE SIMPLEST WAY TO GET DATA ON THIS CARD IS TO RUN A GENETIC CROSS AND CLICK ON THE CHI SQUARE BUTTON.
The Chi Square test gives an individual the probability of his observed data spread occurring due to normal sampling errors if his hypothesis is true. In other words, it tells you for example the probability of getting a data spread of 45 heads and 55 tails if the probability of heads/tails is 1:1. Your observed data is entered in the windows on the right. Click on the ratio button you think your data fits in order to calculate your expected data spread. These values will be automatically calculated after which you can click on the CHI SQUARE button below for the analysis.
NOTE! The way this card is set-up, data from programmed crosses is automatically entered. If you have your own set of data which you wish to check, click on the DATA ENTRY button below. The Observed Data window will be cleared and the cursor automatically placed in the top box. You can then enter your observed data after which you should follow the procedures described above.